package com.example.androidtest_pagerstrip;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class PagerFragment extends Fragment{

	TextView tv;
	String text;
	
	
	public static PagerFragment create(String text) {
		PagerFragment rf = new PagerFragment();
		rf.setText(text);
		return rf;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		TextView tv = new TextView(getActivity());
		tv.setTextSize(100);
		if (!TextUtils.isEmpty(text)) {
			tv.setText(text);
		}
		return tv;
	}

	public void setText(String text) {
		this.text = text;
		if (tv!=null) {
			tv.setText(text);
		}
	}

	public String getText() {
		return text;
	}
	
	
}
